package com.atguigu.springcloud.alibaba.service;

import com.atguigu.springcloud.alibaba.domain.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @Author: 19shusheng.com
 * @Description:
 * @Date: Created in 12:00 2021/3/9
 * @Modified By:
 */
@FeignClient(value = "seata-account-service")
public interface AccoutService {
    /**
     *
     * @Description: 减用户金额
     *
     * @auther: madonghui
     * @date: 13:42 2021/3/9
     * @param: [userId, money]
     * @return: com.atguigu.springcloud.alibaba.domain.CommonResult
     *
     */
    @PostMapping("/account/decrease")
    CommonResult decrease(@RequestParam("userId") Long userId, @RequestParam("money")BigDecimal money);
}
